
//
//  SeletedTypeCell.m
//  PropertyMananger
//
//  Created by bh on 17/2/28.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "SeletedTypeCell.h"

@implementation SeletedTypeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *workCellID = @"SeletedTypeCellID";
    SeletedTypeCell * cell = [tableView dequeueReusableCellWithIdentifier:workCellID];
    if (!cell) {
        
        cell = [[SeletedTypeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:workCellID];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
    
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        self.titleLabel.font = BHFont(15);
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        self.titleLabel.textColor = BHColor(102, 102, 102);
        self.titleLabel.text  = @"抄表类型:";
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.contentView).with.offset(25);
            make.centerY.equalTo(self.contentView).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(70, 30));
        }];
        
        self.iconImg = [[UIImageView alloc]init];
        [self.contentView addSubview:self.iconImg];
        self.iconImg.image = IMG(@"ico_red_dot");
        
        [self.iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self.contentView).with.offset(-15);
            make.centerY.equalTo(self.contentView).offset(0);
            make.size.mas_equalTo(CGSizeMake(10, 10));
        }];
    
    }
    return self;
}

@end
